package cn.itcast.constants;

public class SearchConstants {
    public static final String MAPPING_TEMPLATE = "{\n" +
            "  \"settings\": {\n" +
            "\t\"analysis\": {\n" +
            "\t  \"analyzer\": {\n" +
            "\t\t\"text_analyzer\": {\n" +
            "\t\t  \"tokenizer\": \"ik_max_word\",\n" +
            "\t\t  \"filter\": \"py\"\n" +
            "\t\t},\n" +
            "\t\t\"completion_analyzer\": {\n" +
            "\t\t  \"tokenizer\": \"keyword\",\n" +
            "\t\t  \"filter\": \"py\"\n" +
            "\t\t}\n" +
            "\t  },\n" +
            "\t  \"filter\": {\n" +
            "\t\t\"py\": {\n" +
            "\t\t  \"type\": \"pinyin\",\n" +
            "\t\t  \"keep_full_pinyin\": false,\n" +
            "\t\t  \"keep_joined_full_pinyin\": true,\n" +
            "\t\t  \"keep_original\": true,\n" +
            "\t\t  \"limit_first_letter_length\": 16,\n" +
            "\t\t  \"remove_duplicated_term\": true,\n" +
            "\t\t  \"none_chinese_pinyin_tokenize\": false\n" +
            "\t\t}\n" +
            "\t  }\n" +
            "\t}\n" +
            "  },\n" +
            "  \"mappings\": {\n" +
            "\t\"properties\": {\n" +
            "\t  \"id\":{\n" +
            "\t\t\"type\": \"keyword\"\n" +
            "\t  },\n" +
            "\t  \"name\":{\n" +
            "\t\t\"type\": \"text\",\n" +
            "\t\t\"analyzer\": \"text_analyzer\",\n" +
            "\t\t\"search_analyzer\": \"ik_smart\",\n" +
            "\t\t\"copy_to\": \"all\"\n" +
            "\t  },\n" +
            "\t  \"price\":{\n" +
            "\t\t\"type\": \"long\"\n" +
            "\t  },\n" +
            "\t  \"image\":{\n" +
            "\t\t\"type\": \"keyword\",\n" +
            "\t\t\"index\": false\n" +
            "\t  },\n" +
            "\t  \"category\":{\n" +
            "\t\t\"type\": \"keyword\",\n" +
            "\t\t\"copy_to\": \"all\"\n" +
            "\t  },\n" +
            "\t  \"brand\":{\n" +
            "\t\t\"type\": \"keyword\",\n" +
            "\t\t\"copy_to\": \"all\"\n" +
            "\t  },\n" +
            "\t  \"sold\":{\n" +
            "\t\t\"type\": \"integer\"\n" +
            "\t  },\n" +
            "\t  \"commentCount\":{\n" +
            "\t\t\"type\": \"integer\"\n" +
            "\t  },\n" +
            "\t  \"isAD\":{\n" +
            "\t\t\"type\": \"boolean\"\n" +
            "\t  },\n" +
            "\t  \"suggestion\":{\n" +
            "\t\t  \"type\": \"completion\",\n" +
            "\t\t  \"analyzer\": \"completion_analyzer\",\n" +
            "\t\t  \"search_analyzer\": \"keyword\"\n" +
            "\t  },\n" +
            "\t  \"all\":{\n" +
            "\t\t\"type\": \"text\",\n" +
            "\t\t\"analyzer\": \"text_analyzer\",\n" +
            "\t\t\"search_analyzer\": \"ik_smart\"\n" +
            "\t  }\n" +
            "\t}\n" +
            "  }\n" +
            "}" ;
}
